#pragma once
#ifndef _FORT_MESH_H
#define _FORT_MESH_H

#include <graphics/colour.h>
#include <maths/Vector3.h>
#include <maths/Vector2.h>

#include <system/platform.h>
#include <system/d3d11/directX.h>

namespace fort
{
	

	class Mesh
	{
	public:
		Mesh();
		virtual ~Mesh();

		struct vertex
		{
			Vector3 position;      // position
			Vector3 normal;
			Vector2 uv;
		};

		//-- virtual functions will go here
		virtual void Init(Platform &platform, float x, float y, float z, float scale) = 0;

		virtual void Render() = 0;
		//-- derived classes will include cube, sphere, model etc.
		//-- This will set up buffers etc
		//Cube CreateCube(float x, float y, float z, float scale);
		//-- This will use positional data and buffers to render primitives
		//void CreateCube(float x, float y, float z, float scale);
		//void Render();


	protected:

		virtual void CreateBuffers(Platform &platform, const vertex verts[], const UInt32 indices[]) = 0;
		

	private:
		//-- Can be filled with line, triangle, cube etc data
		//vertex vertices[];
		ID3D11Buffer*  vertex_buffer;
		//PrimitiveType type;
		///Platform *platform;

		static const UInt32 indices[];
		static const Mesh::vertex vertices[];
	};

}

#endif